@keyframes circle-rotate {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(-360deg);
  }
}

.bullet-wrapper {
  position: fixed;
  z-index: 9998;
  left: 0;

  visibility: hidden;

  &:hover {
    z-index: 9999;
    animation-play-state: paused !important;
  }

  .bullet-inner {
    position: relative;

    display: flex;
    flex-direction: row;
    align-items: center;

    box-sizing: border-box;
    padding: 4px;
    height: 40px;
    line-height: 30px;
    border-radius: 30px;
    border: 1px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);

    user-select: none;

    color: #fff; // custom color
    background-color: #06AD3D; // custom bg color

    opacity: .95;

    word-break: keep-all;
    white-space: nowrap;
    text-overflow: ellipsis;

    transition: transform .3s ease;

    &:hover {
      transform: scale(1.15);
    }

    .bullet-avatar {
      display: block;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      font-size: 0;
      overflow: hidden;

      &:hover {
        animation: circle-rotate 1s linear infinite;
      }

      img {
        display: block;
        width: 100%;
        height: 100%;
      }
    }

    .bullet-text {
      margin: 0 4px;
      padding: 0 4px;
      font-size: 14px;

      a {
        display: block;
        color: inherit;
        text-decoration: none;
      }
    }

    .bullet-close {
      position: relative;
      width: 0;
      height: 22px;
      overflow: hidden;

      font-size: 12px;
      font-weight: bold;

      border-radius: 50%;
      background: rgba(255, 255, 255, .2);

      cursor: pointer;
      opacity: 0;
      visibility: hidden;

      transition: transform .3s ease, opacity .3s ease, width .3s ease;
      transform: scale(0);

      &:before,
      &:after {
        position: absolute;
        content: '';
        width: 1px;
        height: 1em;
        background: #fff;
        top: 50%;
        left: 50%;
        transform: translateY(-50%);
      }

      &:before {
        transform: translateY(-50%) rotate(45deg);
      }

      &:after {
        transform: translateY(-50%) rotate(-45deg);
      }
    }
  }

  &.has-close {
    .bullet-inner:hover {
      .bullet-close {
        margin-left: -4px;
        margin-right: 4px;
        width: 22px;
        opacity: 1;
        visibility: visible;
        transform: scale(1);
      }
    }
  }
}
